package a2_p04_ak_fh;

public class AttVertex {
	
	//Attriubte
	private String name;
	private double heuristik;
	private double entf = Double.MAX_VALUE;
	private AttVertex vorg = null;
	private double f = Double.MAX_VALUE;
	private double g = Double.MAX_VALUE;
	
	public AttVertex(String name, double heuristik) {
		this.name=name;
		this.heuristik=heuristik;
	}
	
	public String getName() {
		return this.name;
	}
	
	public Double getAttribute() {
		return this.heuristik;
	}
	
	public void setName(String name) {
		this.name=name;
	}
	
	public void setAttribute(double attribute) {
		this.heuristik=attribute;
	}
	
	
	public double getEntf() {
		return entf;
	}

	public void setEntf(double entf) {
		this.entf = entf;
	}

	public AttVertex getVorg() {
		return vorg;
	}

	public void setVorg(AttVertex vorg) {
		this.vorg = vorg;
	}

	public String toString() {
		return name + " " + heuristik;
		
	}

	public double getF() {
		return f;
	}

	public void setF(double f) {
		this.f = f;
	}

	public double getG() {
		return g;
	}

	public void setG(double g) {
		this.g = g;
	}
	
	  @Override
	  public boolean equals(Object other) {
	    if(other == this) {
	      return true;
	    }
	    if(!(other instanceof AttVertex)) {
	      return false;
	    }
	    return this.getName().equals(((AttVertex)other).getName());
	  }
	  
	   @Override
	    public int hashCode() {
	        return this.getName().hashCode();
	    }

}
